#include "mpHttpResponseStringContent.h"
#include "mpLog.h"

#if defined(MAPLE_MODE_DEBUGGING)
#include "mpLocaleUtils.h"
#endif

namespace MP{
namespace HTTP{
namespace INTERNAL{

HttpResponseStringContent::HttpResponseStringContent() :_data(){

}

std::string HttpResponseStringContent::getData() const{
    return _data;
}

void HttpResponseStringContent::beginReadData(){
    _data.clear();
}

void HttpResponseStringContent::onReadDataSome(const char* data, std::size_t length){
    _data.append(data, length);

#if defined(MAPLE_MODE_DEBUGGING)
    std::string tmp;
    tmp.append(data,length);
    MPLOG_INFO << SYS_TEXT(tmp);
#endif
}

void HttpResponseStringContent::endReadData(){

}

}   //INTERNAL
}   //HTTP
}   //MP
